<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        var eat = true;
var food = "猪肉炖粉条";
if (eat) {
  if (food == "双椒鱼头") {
    console.log('双椒鱼头');    
   }else{
    console.log("猪肉炖粉条");
   }
} else {
  console.log('不吃了');
}


var eat = true;
var food = "猪肉炖粉条";
if (eat) {
  if (food__"双椒鱼头") {  
    console.log('双椒鱼头'); // 打印双椒鱼头
   }else{
    console.log("猪肉炖粉条"); 
   }
} else {
  console.log('不吃了');
}
    </script>
</body>
</html>